package com.nulldev.util.uri.nget;

public abstract class nGetEvent {

	public abstract void onStart(final long length);
	
	public abstract void onDownload(final long bytes, final double percent);
	
	public abstract void onFinish();
	
	public abstract void onError();
	
	private nGet local;
	void assignGet(final nGet ng) {
		this.local = ng;
	}
	
	public String getFileName() {
		if (this.local == null) {
			return "N/A";
		}
		return this.local.overrideName();
	}
	
	protected long getTimeLeft() {
		if (this.local == null) {
			return -1;
		}
		return -1;
		//return this.local.getTimeLeft();
	}
}
